package cn.hct.springboot_pro.dao;

import cn.hct.springboot_pro.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserMapper {

    User getUserByUnameAndPsw(@Param("user_name")String user_name, @Param("password")String password);

    int insertUser(@Param("user_name")String user_name, @Param("phone")String phone,@Param("password")String password);

    User getUserByUname(@Param("user_name")String user_name);

    User getUserById(@Param("user_id")int user_id);

    int updateUser(User user);

    List<User> getUserByMan(@Param("manager") int manager);

    int deleteUserById(@Param("user_id")int user_id);

}
